In-circuit emulation (ICE) has been used by software and hardware developers for a number of years as a development tool to emulate the operation of complex circuit building blocks and permit diagnosis and debugging of hardware and software. In-circuit emulation is most commonly used to analyze and debug the behavior of complex devices such as microcontrollers and microprocessors.
In conventional in-circuit emulation systems, a host computer (e.g., a personal computer) is connected to a debug logic block which is further connected to a special version of the microcontroller device that has been developed specially for use in emulation. Some in-circuit emulation systems use a bond-out version of the microcontroller that includes wirebonding pads on the chip that are not normally connected in the production wirebonding. These pads are connected to pins on the microcontroller package to permit access to otherwise inaccessible points of the circuit to facilitate debugging. This technique has the disadvantage of imposing significant limitations on the circuit layout to permit space and circuitry associated with the special wirebonding pads. Also, interface circuitry and other special circuitry is typically added to facilitate the debugging and bond-out. This increases the complexity, size, power consumption and potentially reduces the yield of the production part. Moreover, development resources are required to design and lay out the bond-out circuitry and pads.
Other in-circuit emulation systems use a special “probe mode” of operation of the processor in which a number of internal signals are routed to a “debug port” for use by the in-circuit emulation system. In these systems, the debug port allows the in-circuit emulation system to communicate with the processors at all times and, when placed in probe mode, to read otherwise inaccessible probe points within the processor. Of course, providing such a probe mode requires significant design resources, increasing development cost, chip complexity and chip size.
In in-circuit emulation operations, operational instructions are loaded from the host computer through the debug logic to the special version of the microcontroller. The debug logic monitors operation of the microcontroller as the instructions are executed. Depending upon the application, this operation may be monitored while the special version of the microcontroller is interconnected with the circuitry that is intended to interface a production version of the microcontroller in the finished product under development. As the circuit is stepped through its operation, the debug logic gathers information about the state of various components of the microcontroller during operation and feeds that information back to the host computer for analysis.
During the course of the analysis, various trace information such as time stamps, register values, data memory content, etc. may be logged in the host computer for analysis and debugging by the designer. Additionally, it is generally the case that various break points can be defined by the designer that cause the program to halt execution at various points in the operation to permit detailed analysis. Other debugging tools may also be provided to enable the user to debug the operation of the circuit.
During the course of the analysis, the microcontroller can perform a sleep function in which the microcontroller “sleeps” or pauses some or all operations. During a typical sleep function the CPU clock of the microcontroller stops operating to conserve battery power. Also, the microcontroller can perform a stall operation in which the microcontroller pauses some operations. During a typical stall operation the CPU clock of the microcontroller continues to operate. Sleep and stall operations should be addressed in in-circuit emulation systems to assure that the in-circuit emulation system emulates the sleep or stall operation.